/* eslint-disable */
import React from "react";
import {Input, Button, message} from "antd";
import axios from "axios";
import qs from "qs";

import Head from "./../Public/Head";

import "./../../view/Main/Main.less";


class Main extends React.Component {
	constructor(props) {
		//创建组件时必须执行的方法，构造方法
		super();
		// console.log(props);
		// this.name = "tom"
		this.state = {
			Account : "",
			Password: "",
		};
	}

	componentWillMount() {
		let UserInfo = sessionStorage.getItem("UserInfo");
		console.log("没有登陆", UserInfo);
		if (!UserInfo) {
			this.props.history.push("/login");
			console.log("没有登陆", UserInfo);
		}
	}

	handleSubmit = (e) => {
		e.preventDefault();
		// console.log(this.state);
		let {Account, Password} = this.state;
		if (!Account && !Password) {
			message.info("账号密码错误");
		}

	};
	AccountInput = (type, e) => {
		if (type == "Password") {
			var data = {
				Password: e.target.value,
			};
		} else {
			var data = {
				Account: e.target.value,
			};
		}
		this.setState(data);

	};

	render() {
		return (
			<div className="mian">
				<Head></Head>
				<div className="mian-bg relative">
					<div className="w-400px absolute content">
						<div className="w-100 text-center fw" style={{fontSize: '50px'}}>开启精准营养新纪元</div>
						<div className="w-100 text-center mt-50px text-666">私人定制的营养干预方案</div>
						<div className="w-100 text-center text-666">革命性的技术突破实现真正意义的“千人千方”</div>
						<div className="w-100 text-center mt-100px">
							<Button className="w-200px" href="/index" type="primary" shape="round" size="large">开始使用</Button>
						</div>
					</div>
				</div>
			</div>
		);
	}


}

export default Main;
